package pers.julio.notepad.PageSwitcher.Bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * ClassName:  CorePage
 * Description: <一句话功能简述>
 * Author: julio_chan  2020/10/20 11:46
 */
public class PageBean implements Parcelable {
    private String mName;      //页面名
    private String mClazz;     //页面class
    private String mParams;    //传入参数，json object结构

    public PageBean() { }
    public PageBean(String name, String clazz, String params) {
        mName = name;
        mClazz = clazz;
        mParams = params;
    }

    protected PageBean(Parcel in) {
        mName = in.readString();
        mClazz = in.readString();
        mParams = in.readString();
    }

    public static final Creator<PageBean> CREATOR = new Creator<PageBean>() {
        @Override
        public PageBean createFromParcel(Parcel in) {
            return new PageBean(in);
        }

        @Override
        public PageBean[] newArray(int size) {
            return new PageBean[size];
        }
    };

    public String getName() { return mName; }
    public void setName(String name) { mName = name; }

    public String getClazz() { return mClazz; }
    public void setClazz(String clazz) { mClazz = clazz; }

    public String getParams() { return mParams; }
    public void setParams(String params) { mParams = params; }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(mName);
        dest.writeString(mClazz);
        dest.writeString(mParams);
    }
}
